import request from '../request'
import requestUrl from '../requestUrl'
import requestParam from '../requestParam'

// 获取代理列表菜单
export function getAgencyMenu () {
  return [
    {
      menuId: '1',
      title: '概况',
      icon: 'iconfont icon-news_light',
      routeName: undefined,
      list: [
        {
          menuId: '1-1',
          title: '系统概况',
          icon: '',
          routeName: 'ag-overview-sys'
        }
      ]
    },
    {
      menuId: '2',
      title: '小程序列表',
      icon: 'iconfont icon-fujian',
      routeName: undefined,
      list: [
        {
          menuId: '2-1',
          title: '小程序列表',
          icon: '',
          routeName: 'ag-applist'
        }
      ]
    },
    // {
    //   menuId: '3',
    //   title: '系统设置',
    //   icon: 'iconfont icon-add_circle',
    //   routeName: undefined,
    //   list: [
    //     {
    //       menuId: '3-1',
    //       title: '系统配置',
    //       icon: '',
    //       routeName: 'ag-system-config'
    //     }
    //   ]
    // },
    {
      menuId: '4',
      title: '应用管理',
      icon: 'iconfont icon-applist',
      routeName: undefined,
      list: [
        {
          menuId: '4-1',
          title: '应用管理',
          icon: '',
          routeName: 'ag-app-manage'
        }
      ]
    },
    {
      menuId: '5',
      title: '用户管理',
      icon: 'iconfont icon-user_empty',
      routeName: undefined,
      list: [
        {
          menuId: '5-1',
          title: '用户管理',
          icon: '',
          routeName: 'ag-user-manage'
        }
      ]
    },
    // {
    //   menuId: '6',
    //   title: '代理管理',
    //   icon: 'iconfont icon-m-user',
    //   routeName: undefined,
    //   list: [
    //     {
    //       menuId: '6-1',
    //       title: '代理管理',
    //       icon: '',
    //       routeName: 'ag-agency-manage'
    //     },
    //     {
    //       menuId: '6-2',
    //       title: '加盟申请',
    //       icon: '',
    //       routeName: 'ag-agency-apply'
    //     }
    //   ]
    // }
  ]
}

// 获取小程序列表
// 获取小程序种类
export function getAppList (params) {
  return request({
    url: requestUrl('/agency/applist'),
    method: 'post',
    data: requestParam(params)
  })
}
